<?php
class Familles extends CI_Controller{
	public function Nom($nom){
		
		require_once(APPPATH.'controllers/Menu.php');
		$menu=new Menu();
		
		$this->load->view('vHeader');
		$menu->index();
		$nomFamille=str_replace("-", " ", $nom);
		
		$query=$this->doctrine->em->createQuery("SELECT p FROM Plante p JOIN p.idfamille f WHERE f.nom='".$nomFamille."'");
		$plantes=$query->getResult();
		
		$this->load->view('vFamille',array('plantes'=>$plantes,'nomFamille'=>$nomFamille));
		$this->load->view('vFooter');
		
	}
}